"""Main Controller"""
from testapp.lib.base import BaseController
from tg import expose, flash
from pylons.i18n import ugettext as _
#from tg import redirect, validate
#from testapp.model import DBSession, metadata
#from dbsprockets.dbmechanic.frameworks.tg2 import DBMechanic
#from dbsprockets.saprovider import SAProvider

import pylons

from tw.lymon import View

view = View()


class RootController(BaseController):
    #admin = DBMechanic(SAProvider(metadata), '/admin')

    @expose('testapp.templates.index')
    def index(self):
        flash(_("You're running TG2! (change me in root.py)"))
        pylons.c.w.link = view.view()
        
        return dict(page='index')

    @expose('testapp.templates.about')
    def about(self):
        return dict(page='about')
        
from lymon.viewties import View

v = View()


